package com.example.musicrunner;


import com.example.musicrunner.client.WebKitActivity;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class SetupActivity extends Activity {
	
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_setup);
	setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

	setupButtonGetMusic();
	setupButtonLocation();
	setupButtonLastFM();
}
private void setupButtonGetMusic() {
	ImageButton button = (ImageButton) findViewById(R.id.btnMusic);
	button.setOnClickListener(new OnClickListener() {
	   @Override
	   public void onClick(View v) {
		   
		   startActivity(new Intent(SetupActivity.this, ChangeActivity.class));	   
	 }
	});
   }
private void setupButtonLocation() {
	ImageButton button = (ImageButton) findViewById(R.id.btnLocation);
	button.setOnClickListener(new OnClickListener() {
	   @Override
	   public void onClick(View v) {
		   
		   startActivity(new Intent(SetupActivity.this, LocationMapActivity.class));	   
	 }
	});
   }

private void setupButtonLastFM() {
	ImageButton button = (ImageButton) findViewById(R.id.btnLastFM);
	button.setOnClickListener(new OnClickListener() {
	   @Override
	   public void onClick(View v) {
		   
		   startActivity(new Intent(SetupActivity.this, WebKitActivity.class));	   
	 }
	});
   }


@Override
public boolean onCreateOptionsMenu(Menu menu) {
	// Inflate the menu; this adds items to the action bar if it is present.
	getMenuInflater().inflate(R.menu.setup, menu);
	return true;
 }

}